package demo;

import java.util.Scanner;

public class AllTest {
    public static void main(String[] args) {
    //目标：完成健康计算器。
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您的身高：");
        double height = sc.nextDouble();

        System.out.println("请输入您的体重：");
        double weight = sc.nextDouble();

        double bmi = getBMI(height,weight);
        System.out.println("您的BMI值为：" + bmi);
    }
    public static double getBMI(double height,double weight){
        return weight/(height*height);
    }
}

